package main

import (
	"fmt"
	"github.com/gorhill/cronexpr"
	_ "github.com/gorhill/cronexpr"
	"time"
)

func main() {
	var (
		expr *cronexpr.Expression
		err error
		now time.Time
		next time.Time
	)
	if expr,err = cronexpr.Parse("*/5 * * * *");err != nil{
		fmt.Println(err)
		return
	}
	now = time.Now()
	next = expr.Next(now)
	fmt.Println(now,next)
}
